<?php
require_once 'dataBaseConnectivityFile.php';
error_reporting(1);
$username=$_REQUEST["email"];
$password=$_REQUEST["password"];
$email;
$pass;
$user_id;

		$sql_get=mysql_query("select * from admin where EMAIL='".$username."'  and PASSWORD='".$password."'  ");
        while ($db_field=mysql_fetch_assoc($sql_get))
            {
                $email=$db_field["EMAIL"];
                $pass=$db_field["PASSWORD"];
                $admin_id=$db_field["ADMIN_ID"];
            }
                if($username != $email && $password != $pass || $username=="" || $password=="")
                    {
                    ?>
                            <script type="text/javascript">
                                alert("Invalid Username or Password");
                                history.back();
                            </script>
                    <?php
                    }
                    else
                        {
                            session_start();
                            $_SESSION['uid']=$admin_id;
                            header("location:adminDashBoard.php");
                        }
?>